<?php
/*------------------------------------------------------------------------

# TZ Portfolio Extension

# ------------------------------------------------------------------------

# author    TranLamTemPlaza

# copyright Copyright (C) 2012 templaza.com. All Rights Reserved.

# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL

# Websites: http://www.templaza.com

# Technical Support:  Forum - http://templaza.com/Forum

-------------------------------------------------------------------------*/

defined('_JEXEC') or die;

JHtml::_('stylesheet', 'mod_languages/template.css', array(), true);
?>

<?php if ($params->get('dropdown', 1)) : ?>
    <form name="lang" method="post" action="<?php echo htmlspecialchars(JURI::current()); ?>">
        <select class="inputbox" onchange="document.location.replace(this.value);" >
            <?php foreach ($list as $language) : ?>
                <option dir=<?php echo JLanguage::getInstance($language->lang_code)->isRTL() ? '"rtl"' : '"ltr"'?> value="<?php echo $language->link;?>" <?php echo $language->active ? 'selected="selected"' : ''?>>
    <?php echo $language->title_native;?></option>
<?php endforeach; ?>
        </select>
    </form>
<?php else : ?>
<div class="languages block">
        <?php foreach ($list as $language) : ?>
            <?php if ($params->get('show_active', 0) || !$language->active):?>
                <a href="<?php echo $language->link;?>">
                    <?php if ($params->get('image', 1)):?>
                        <?php echo JHtml::_('image', 'mod_languages/' . $language->image . '.gif', $language->title_native, array('title' => $language->title_native), true);?>
                    <?php else : ?>
                        <?php echo $params->get('full_name', 1) ? $language->title_native : strtoupper($language->sef);?>
                    <?php endif; ?>
                </a>
            <?php endif;?>
        <?php endforeach;?>
</div>
<?php endif; ?>

<?php if ($footerText) : ?>
    <div class="posttext"><p><?php echo $footerText; ?></p></div>
<?php endif; ?>

